ls = input("请输入一个由数字组成的字符串，由空格分隔\n").split()
print(ls)
ls.sort()
print(ls)
for i in range(len(ls)):
    if i != len(ls) - 1:
        if ls[i] != ls[i + 1]:
            print("数字", ls[i], ":", ls.count(ls[i]))
    else:
        if ls[i] != ls[i - 1]:
            print("数字", ls[i], ":", 1)
        else:
            print("数字", ls[i], ":", ls.count(ls[i]))